package com.yayan.xh.dao;

import java.util.List;
import java.util.Map;

import com.yayan.xh.bean.NewsBean;

public interface INewsDao {
	/**
	 * 查询资讯总页数
	 * @param map
	 * @return
	 */
	Integer getNewsPageCount(Map<String, String> map) throws Exception;
	
	/**
	 * 分页查询资讯信息
	 * @param map
	 * @return
	 */
	List<Map<String, Object>> getNewsPage(Map<String, String> map) throws Exception;
	
	/**
	 * 查询单个资讯信息
	 * @param map
	 * @return
	 * @throws Exception
	 */
	List<Map<String, Object>> getNewsByNewsId(Map<String, String> map) throws Exception;
	
	/**
	 * 查询新闻资讯 后台
	 * @param map
	 * @return
	 * @throws Exception
	 */
	List<NewsBean> getNewsListBack(Map<String, String> map) throws Exception;
	
	/**
	 * 保存新闻资讯
	 * @param map
	 * @return
	 * @throws Exception
	 */
	boolean saveNews(Map<String, String> map) throws Exception;
	
	/**
	 * 查询单个
	 * @param map
	 * @return
	 * @throws Exception
	 */
	NewsBean getNewsByIdBack(Map<String, String> map) throws Exception;
	
	/**
	 * 修改新闻资讯
	 * @param map
	 * @return
	 * @throws Exception
	 */
	boolean modifyNews(Map<String, String> map) throws Exception;
	
	/**
	 * 删除新闻资讯
	 * @param map
	 * @return
	 * @throws Exception
	 */
	boolean delNews(Map<String, String> map) throws Exception;
}
